﻿@using FogBugzPd.Web
@using FogBugzPd.Web.Models
@using FogBugzPd.Web.Utils
@using FogBugzPd.Infrastructure.Web
@using StackExchange.Profiling
<!DOCTYPE html>
<html>
	<head>
		<title>@ViewBag.Title</title>
	    
        @RenderSection("Meta", false)
		
        <link href="@Url.Content("~/Content/packages/bootstrap/css/bootstrap.css")" rel="stylesheet" type="text/css" />
	    <link href="@Url.ContentV("~/Content/css/style.css")" rel="stylesheet" type="text/css" />
        
	    <style>
			html,
			body {
				height: 100%;
			}
 
			#wrap {
				min-height: 100%;
				height: auto !important;
				height: 100%;
				margin: 0 auto -30px;
			}
			#push,
			#footer {
				height: 30px;
			}
			.profiler-result .label{
				text-transform:none;
			}
		</style>

		@RenderSection("Css", false)
		
	</head>

<body>
	<div id="wrap">
		@if (UserContext.IsLoggedIn)
		{
			@Html.Partial("_TopNavigation")
		}
        
		<div class="container page-notification">
			<div class="notification" id="notification-div">
				@if (UserContext.PageNotification != null)
	{
					@Html.PageNotification(UserContext.PageNotification.Message, UserContext.PageNotification.Type)
                    UserContext.ResetNotification();
	}
			</div>
		</div>

	    <div class="container">
			<h2>@ViewBag.MasterTitle
				<small>
					@if (ViewBag.WikiPageId != null)
					{
						<a class="wikilink" target="_blank" href="@FogBugzUrlUtils.GetWikiUrl(ViewBag.WikiPageId)"><i class="icon-book"></i></a>
					}
				</small>
			</h2>
			@RenderBody()
		</div>
		<div id="push"></div>
	</div>
	
	<div id="footer">
		<a href="http://www.entechsolutions.com" style="text-decoration: none;"><div class="footer-copy">&copy; 2012 ENTech Solutions &trade;</div></a>
	</div>
	
	<script src="@Url.Content("~/Content/js/jquery-1.8.2.min.js")"></script>
	<script src="@Url.Content("~/Content/packages/bootstrap/js/bootstrap.js")"></script>
	<script src="@Url.Content("~/Content/js/jquery.validate.min.js")"></script>
	<script src="@Url.Content("~/Content/js/jquery.validate.unobtrusive.min.js")"></script>
	<script src="@Url.Content("~/Content/js/additional-methods.min.js")"></script>
    <script src="@Url.Content("~/Content/js/cache.js")"></script>
	<script src="@Url.Content("~/Content/js/common.js")"></script>
	@RenderSection("Js", false)
	
	<script type="text/javascript">
		function resolveUrl(relativeUrl) 
		{
			var webAppRoot = "@Url.Content("~/")";
			var absoluteUrl;
		   
			if (relativeUrl=="~")
				absoluteUrl=webAppRoot;
			else
				absoluteUrl=relativeUrl.replace("~/", webAppRoot);

			return absoluteUrl;
		}
	</script>

	@if (!String.IsNullOrEmpty(EnvironmentConfig.GoogleAnalyticsCode))
	{
		<!-- Google Analytics -->
		<script type="text/javascript">
			(function(i, s, o, g, r, a, m) {
				i['GoogleAnalyticsObject'] = r;
				i[r] = i[r] || function() {
					(i[r].q = i[r].q || []).push(arguments)
				}, i[r].l = 1 * new Date();
				a = s.createElement(o), m = s.getElementsByTagName(o)[0];
				a.async = 1;
				a.src = g;
				m.parentNode.insertBefore(a, m)
			})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');

			ga('create', '@EnvironmentConfig.GoogleAnalyticsCode', 'fogbugzpd.com');
			ga('send', 'pageview');

		</script>
	}

	@if (!String.IsNullOrEmpty(EnvironmentConfig.SnapEngageCode))
	{
			<!-- begin SnapEngage code -->
			<script type="text/javascript">
 			(function() {
 				var se = document.createElement('script');
 				se.type = 'text/javascript';
 				se.async = true;
 				se.src = '//commondatastorage.googleapis.com/code.snapengage.com/js/@(EnvironmentConfig.SnapEngageCode).js';
 				var s = document.getElementsByTagName('script')[0];
 				s.parentNode.insertBefore(se, s);
 			})();
 		</script>
			<!-- end SnapEngage code -->
	}
		
	@MiniProfiler.RenderIncludes()
</body>
</html>
